<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>404 页面未找到</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        :root {
            --bg: #0f0c29;
            --glass: rgba(255, 255, 255, 0.08);
            --blur: blur(12px);
            --glow: #00c9ff;
            --text: #ffffff;
            --sub: #c3cfe2;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--bg), #302b63, #24243e);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            overflow: hidden;
        }

        .container {
            text-align: center;
            padding: 3rem 2.5rem;
            border-radius: 20px;
            background: var(--glass);
            backdrop-filter: var(--blur);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
            border: 1px solid rgba(255, 255, 255, 0.07);
            max-width: 520px;
            width: 90%;
            animation: fadeIn 0.8s ease-out;
        }

        h1 {
            font-size: 6rem;
            font-weight: 900;
            color: var(--text);
            letter-spacing: 4px;
            margin-bottom: 0.5rem;
            text-shadow: 0 0 10px var(--glow), 0 0 20px var(--glow);
        }

        h2 {
            font-size: 1.75rem;
            color: var(--sub);
            margin-bottom: 1rem;
            font-weight: 500;
        }

        p {
            color: var(--sub);
            margin-bottom: 2rem;
            line-height: 1.6;
        }

        .btn {
            display: inline-block;
            padding: 0.75rem 1.75rem;
            border-radius: 30px;
            background: transparent;
            color: var(--text);
            border: 2px solid var(--glow);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            width: 0;
            height: 100%;
            background: var(--glow);
            transition: width 0.4s ease;
            z-index: -1;
        }

        .btn:hover {
            color: var(--bg);
            box-shadow: 0 0 15px var(--glow);
        }

        .btn:hover::before {
            width: 100%;
        }

        .stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .star {
            position: absolute;
            width: 2px;
            height: 2px;
            background: var(--text);
            border-radius: 50%;
            animation: twinkle 4s infinite ease-in-out;
            opacity: 0.7;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes twinkle {
            0%, 100% {
                opacity: 0.2;
                transform: scale(0.8);
            }
            50% {
                opacity: 1;
                transform: scale(1.2);
            }
        }

        footer {
            position: absolute;
            bottom: 1rem;
            width: 100%;
            text-align: center;
            color: var(--sub);
            font-size: 0.8rem;
            opacity: 0.6;
        }
    </style>
</head>
<body>
    <div class="stars" id="stars"></div>

    <div class="container">
        <h1>404</h1>
        <h2>页面未找到</h2>
        <p>抱歉，您访问的页面已失踪或从未存在。<br>点击下方按钮返回首页，继续探索。</p>
        <a class="btn" href="/">返回首页</a>
    </div>

    <footer>© 2025 YourSite. All rights reserved.</footer>

    <script>
        // 动态生成星星背景
        const starsContainer = document.getElementById('stars');
        const starCount = 80;
        for (let i = 0; i < starCount; i++) {
            const star = document.createElement('div');
            star.className = 'star';
            star.style.left = Math.random() * 100 + '%';
            star.style.top = Math.random() * 100 + '%';
            star.style.animationDelay = Math.random() * 4 + 's';
            starsContainer.appendChild(star);
        }
    </script>
</body>
</html>